<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>推送用户管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/notify/notiUser/">推送用户列表</a></li>
		<shiro:hasPermission name="notify:notiUser:edit"><li><a href="${ctx}/notify/notiUser/form">推送用户添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="notiUser" action="${ctx}/notify/notiUser/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>编号：</label>
				<form:input path="id" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>用户名：</label>
				<form:input path="username" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
                <%--<li><label>密码：</label>
                    <form:input path="password" htmlEscape="false" maxlength="100" class="input-medium"/>
                </li>--%>
			<li><label>邮箱：</label>
				<form:input path="email" htmlEscape="false" maxlength="200" class="input-medium"/>
			</li>
			<li><label>姓名：</label>
				<form:input path="name" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
                <%--<li><label>用户状态:</label>
                    <form:select path="online" class="input-medium">
                        <form:option value="0" label="离线"/>
                        <form:option value="1" label="在线"/>
                    </form:select>
                </li>--%>
			<li><label>注册日期：</label>
				<input name="createddate" type="text" maxlength="20" class="input-medium Wdate"
					   value="<fmt:formatDate value="${notiUser.createddate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			</li>
			<%--<li><label>updateddate：</label>--%>
				<%--<input name="updateddate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"--%>
					<%--value="<fmt:formatDate value="${notiUser.updateddate}" pattern="yyyy-MM-dd HH:mm:ss"/>"--%>
					<%--onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>--%>
			<%--</li>--%>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
			<li style="float: right;margin-right: 50px;">
				<td align="right">${onlinePersons}<img src="${ctxStatic}/images/user-online.png"></td>
			</li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>编号</th>
				<th>用户名</th>
				<th>姓名</th>
				<th>别名</th>
				<th>标签</th>
				<th>appId</th>
				<th>地理位置</th>
				<th>app版本</th>
				<th>mac</th>
				<th>设备型号</th>
				<th>imsi</th>
				<th>deviceId</th>
				<th>用户状态</th>
				<th>邮箱</th>
				<th>注册日期</th>
				<%--<th>updateddate</th>--%>
				<shiro:hasPermission name="notify:notiUser:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="notiUser">
			<tr>
				<td><a href="${ctx}/notify/notiUser/form?id=${notiUser.id}">
					${notiUser.id}
				</a></td>
				<td>
					${notiUser.username}
				</td>
				<td>
						${notiUser.name}
				</td>
				<td>
                        ${notiUser.alias}
                </td>
                <td>
                        ${notiUser.tag}
				</td>
				<td>
						${notiUser.appId}
				</td>
				<td>
						${notiUser.address}
				</td>
				<td>
						${notiUser.appEdition}
				</td>
				<td>
						${notiUser.mac}
				</td>
				<td>
						${notiUser.unitModel}
				</td>
				<td>
						${notiUser.imsi}
				</td>
				<td>
						${notiUser.deviceId}
				</td>

				<td>
						<%--${notiUser.online}--%>
					<c:choose>
						<c:when test="${notiUser.online eq '0'}">
							<img src="${ctxStatic}/images/user-offline.png">
						</c:when>
						<c:otherwise>
							<img src="${ctxStatic}/images/user-online.png">
						</c:otherwise>
					</c:choose>

				</td>
				<td>
					${notiUser.email}
				</td>
				<td>
					<fmt:formatDate value="${notiUser.createddate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<%--<td>--%>
					<%--<fmt:formatDate value="${notiUser.updateddate}" pattern="yyyy-MM-dd HH:mm:ss"/>--%>
				<%--</td>--%>
				<shiro:hasPermission name="notify:notiUser:edit"><td>
    				<a href="${ctx}/notify/notiUser/form?id=${notiUser.id}">修改</a>
					<a href="${ctx}/notify/notiUser/delete?id=${notiUser.id}" onclick="return confirmx('确认要删除该推送用户吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>